package com.ys.sboot.mybatis.example.controller;

import com.ys.sboot.mybatis.example.model.UserDO;
import com.ys.sboot.mybatis.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>@description:</p>
 *
 * @author yangshuang
 * @version 1.0
 * @date 2018/4/27 10:16
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping(value = "/get")
    public UserDO getUserById(Long id) {
        return userService.selectById(id);
    }
}
